package com.sky.mapper;

import com.sky.aop.AutoFill;
import com.sky.entity.SetmealDish;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SetmealDishMapper {


    /**
     * 套餐跟菜品的关联关系
     * @param setmealDishes
     */
    @AutoFill(OperationType.INSERT)
    void insertBath(List<SetmealDish> setmealDishes);

    /**
     * 删除套餐和菜品关联id
     * @param setmealId
     */
    void deleteBySetmealId(Long setmealId);

    /**
     * 修改关联信息
     * @param setmealDishes
     */
    void insertBatch(List<SetmealDish> setmealDishes);

    /**
     * 套餐启售停售
     * @param disable
     * @param id
     * @return
     */
    int getDishByStatusAndSetmealId(Integer disable, Long id);
}
